062 understanding recipes in hmi
在本视频中我们将讨论西门子 HMI 中的配方功能。
In this video we will talk about recipe function in Siemens HMI.
好吧,现在在配方中我们通常会在 PLC 中以特定格式移动数据。
Alright now in recipe what we do we generally move the data in a specific format in the PLC.
好吧,如果您在当前的示例中看到我们正在开发汇编器,其中该汇编器正在选择蓝色对象并放在蓝色底座上,因此它只能组装蓝色对象,因为在我们的 HMI 中 - 选择了蓝色配方。
all right if you see in this current example we are working on assembler in which this assembler is picking the blue object and putting on the blue base so it is assembling the blue objects only alright because in our HMI - blue recipe is selected.
好的?
Okay?
如果我选择绿色配方,那么它只会检查绿色框,所以让我们举个例子,但在更改配方之前,我必须停止操作,这样当我按停止时,它将继续当前操作,并且它会停止,好吗?
If I select the green recipe then it will only check the green boxes okay so let's have an example but before changing the recipe I have to stop the operation so when I press stop it will continue the current operation and it will stop okay?
现在操作已停止,让我们将配方更改为绿色,以便选择此绿色?
Now the operation is stopped and let's change the recipe to green so this green is selected?
现在我将再次按“开始”,在这种情况下,您会注意到这只会对绿色对象进行拾取和放置,因为我们在这里需要一个绿色配方,好吗?
Now I'll press Start again now in this case you will notice this will only do pick and place with the green object because we need a green recipe here all right?
如果我做绿色和蓝色,它就会同时做绿色和蓝色。
And if I do green and blue it will do both for green and blue.
所以现在这是绿色的,我将按停止,我现在将配方更改为绿色和蓝色,所以现在你会看到,当我按开始时,这将是我的主要优先事项,如果底座是绿色的,这将选择绿色框绿色盖子并将其放在底座上,但如果底座是蓝色的,则只会将蓝色盒子放在蓝色盖子上,这样您就可以看到这个示例。
So right now this is going for green I'll press stop and I will change the recipe now to green and blue so now you will see when I press Start this will be my main priority if the base is green this will select the green box the green lid and put it on the base but if the base is blue it would only put the blue box the blue lid alright so you can see this example.
现在配方到底在做什么,当我按下这些按钮绿色、蓝色、绿色和蓝色时,我有一些数字正在移入 PLC 寄存器。
Now what exactly recipe is doing is when I press these buttons green blue and green and blue I have some numbers which I am moving into the PLC registers.
例如,如果您现在在这里看到它是绿色和蓝色,则绿色和蓝色我有这个电阻器 MB 111 和 MB 112,其值为 6 和 3,如果我单击蓝色,这些数字将更改为蓝色的其他值它是三个和三个或者可能是其他值我将向您展示,对于绿色,我们有不同的值,因此我们有一些特定的寄存器,即 MB 110 MB 111、MB 112 这三个电阻器根据配方将具有不同的值您可以从 HMI 中进行选择。
For example if you see here right now it's green and blue for this green and blue I have this resistor MB 111 and MB 112 which is having value 6 and 3 all right if I click on blue these numbers will change to some other value for blue it's three and three or maybe some other value I will show you that for a green we have a different value so we have some specific register which is MB 110 MB 111, MB 112 these three resistors we have will have different value based on which recipe you select from the HMI.
好的?
Okay?
因此,让我开始操作,我将向您展示该电阻器中的值将如何变化,这就是我们将要学习的如何按下按钮并将值从 HMI 配方表移动到 PLC 数据寄存器。
So let me just start the operation and I will show you how the value will change in that resistor and this is what we are going to learn how to press the button and move the value from the HMI recipe table to PLC data registers.
好吧..
Alright..
所以目前如果你看到配方是绿色和蓝色的,如果我选择绿色,你会注意到值是 5、6 和 6,所以 5 和 MB 110、MB 111 是 6 和 6。 MB 112 是 6。
so currently if you see the recipe is green and blue right if I select on green and you will notice the value is 5, 6 and 6, so five and MB 110, MB 111 is 6 & MB 112 is 6.
如果我单击蓝色,您会注意到值从 MB 110 变为 2,MB 111 变为 3,MB 112 变为 3,因此这是 2、3 和 3 如果我单击绿色和蓝色,则变为 2、6 和 3。 3.
If I click on blue you will notice the value change from from MB 110 is now 2, MB 111 is 3 and MB 112 is 3 so this is 2, 3 and 3 If I click on green and blue this is 2, 6 & 3.
我希望您能看到这一点,所以我们基本上有三个寄存器,我们通过配方更改其中的值,那么如何做到这一点让我们进入 HMI。
I hope you can see that so we have basically three registers in which we are changing the value via recipes so how to do that let's go to the HMI.
在 HMI 中,您将看到食谱,因此单击它,您将看到一个食谱表,这是我创建的表,所以我要做的是现在删除它并为您重新制作它...
In HMI you will see the recipes so click on that and you will see a recipe table so this is a table which i have created so what I'm going to do is I'm going to delete it now and make it again for you...
所以这是我的食谱我会删除它..
so that's my recipe I will delete it..
所以现在我没有任何食谱,所以要开始食谱,你应该点击这个,你可以在这里给它一个名字......所以我会写“颜色”,好吧,这是我的第一个食谱,所以在这个食谱中...
so now I don't have any recipes ok so to start the recipe you should click on this one and you can give it a name here...so I'll write 'color' alright this is my first recipe so in this recipe...
这是显示名称,我也可以将其更改为“颜色”,这是配方编号,这很重要,我们稍后会理解,这是配方编号,这里是创建时的版本,这是应该限制的类型这是您想要的配方中记录的最大数量,因此默认情况下为 100 即可。
this is the display name I can also change that to 'color' and this is the recipe number this is important we will understand later this is the recipe number and here you have the version when it is created this is the type that should be limited and this is the maximum number of the records you want in the recipe so this is by default 100 that's okay.
现在你必须创建元素了..现在在元素中......
Now you have to create the elements alright ..now in the element ...
正如我告诉你的那样,我有三个寄存器 MB 111 110 和 112,所以在这三个寄存器中我给出了一些名称,所以我会在这里写绿色 - 这是第一个配方,其中我只想要绿色盒子,这里是蓝色的..这里是绿色和蓝色可以吗?
I have three registers as I told you MB 111 110 and 112 so in these three registers I have given some name so I will write here green- this is the first recipe in which I only want green color boxes here it's blue..here it's green and blue okay?
现在这是标签,我们必须为标签提供第一个标签,因此您将在此处选择转到 PLC 标准标签,从这里我可以选择 MB 110,这是我的盖子颜色输入,选择这个,MB 112 应该是 111首先,然后应该是 112 好吧..
So now this is the tag now we have to give the tag the first tag so you will select here go to your PLC standard tags and from here I can select MB 110 which was my lid color input select this one and MB 112 should be 111 first and then this should be 112 Alright..
我应该..
I should..
我会..
I will..
我想更改这个名称,以便它与这个名称相匹配,这是我的盖子,这是我的底座 1,这是我的底座 2 - 好吧,所以我有三个寄存器,分别是 MB 110 111 和 112 现在这三个电阻器可以有我可以给出一些默认值,例如 2、3 和 3 。这是我的蓝色默认值,好吧,这不是必需的,您也可以给它零,现在由您在数据记录中决定我现在必须创建记录。
I would like to change this name so that it will match this one this is my lid and this is my Base 1 this is my Base 2- all right so I have three registers which are MB 110 111 and 112 now these three resistors can have some default value which I can give like 2, 3 and 3 .This is my default value for blue colors all right this is not necessary you can also give it zero it's up to you now in the data records I have to create the records now.
现在这是我想通过按下按钮输入的值,好吧..所以现在我知道对于我的绿色食谱来说,这是基于你如何对你的电脑进行编程,因为当你要编写食谱时,你应该拥有数据你想要在plc中移动的数据应该由程序员定义,所以在本课中我们不学习如何获得这个值2 3 3 3 4 5无论我们学习如何将该值从HMI移动到PLC。
Now here comes the value which I want to put by pressing the button okay ..so now I know that for my green recipe now this is based on how you program your PC because when you are going to write the recipe you should have the data which you want to move in the plc that data should be defined by the programmers so in this lesson we are not learning how I get this values 2 3 3 3 4 5 whatever we are learning how to move this value from HMI to PLC.
好吧,我将输入我所知道的汇编程序所需的程序员值。
Alright so I'm going to enter the value which I know as the programmer which I need for assembler.
好吧,对于我的绿色组件,我需要 2、3 和 3,对于我的蓝色组件,我需要盖子为 5,这是 6,这是 6,用于蓝色和绿色,我在其中组装两个盒子......
Alright so for my green color assembly I need 2, 3 and 3 alright for my blue color assembly I need lid to be 5 this to be 6 this to be 6 for blue and green in which I am assembling both boxes...
我需要这个是2..
I need this to be 2..
这个是 6,这个是 3..
This to be 6 and this to be 3..
好吧,这就是数据,只是为了让您概述一下我如何获取这些数据,如果您注意到这里是工厂 I/O,我们有这个视觉传感器,好吧,这是...
Alright so this is the data so just to give you an overview how I'm getting this data if you notice is factory i/o here we have this vision sensor alright this is a...
我已重命名底座探测器和盖子探测器,这是我的视觉传感器,如果您注意到,我将启动传送带,该视觉传感器会根据物体的颜色为我提供值,所以如果我用力转动传送带通知这是一个基础检测器,它的值为 6,因为我的基础是绿色,所以如果你有蓝色,它会给你一个不同的值...
I have rename that base detector and lid detector this is my vision sensor and if you notice I'm going to actuate the conveyor and this vision sensor give me the value based on the color of the object alright so if I forcefully turn the conveyor notice that this is a base detector this is getting the value of 6 because the base is my is green color alright so if you have a blue color it will give you a different value...
让我们看看这个传送带,这样你就可以看到这是一个蓝色的盖子,它的值为 2 好吧......
so let's see this conveyor so you can see that this is a blue lid and this is having the value two Alright...
现在,在这个软件环境中,您会注意到我们有一些 QR 代码,因此,如果您可以想象这些值来自打印在该对象上的 QR 代码,那么该 QR 代码具有与该 QR 代码不同的代码,因此基于这些值的组合6 和 2..
now in this software environment you will notice we have some QR codes so if you can imagine these values are coming from the QR code printed on this object so this QR code has a different code then this QR code so based on this combination of these values 6 and 2..
我已经创建了这个表格 - 如果您想了解更多详细信息,您可以研究这个 PLC 程序,我如何对其进行编程以及我如何进行组装,如果您有软件许可证和这个西门子 TIA 软件,您也可以您也可以看看它在你的电脑上运行得怎么样好吗?
I have created this table alright - if you want to learn more in detail you can study this PLC program how I have program it and how I am doing assembly and if you have the software license and this Siemens TIA software you can also you can also see how it is working in your computer alright?
这就是我创造的三项记录,所以我所做的一切又回来了......
So these were the three records I have created so what I've done is come back again...
我们创建了一个名为颜色的配方。
we have created a recipe named color.
我们定义了三个要素......
We have defined three elements in that ...
三个数据寄存器..您要在其中移动值,然后转到数据记录,我们将其命名为绿色的第一个数据记录,它将突出显示您要在这三个寄存器中移动的值...这些寄存器盖子,基址1 和 Base 2 ...这三列是自动创建的,因为我们已经在这里创建了,所以这些行现在在这里作为列,好的,所以当我按下绿色时,当我启动绿色时,它将移动到 3-3各自的数据寄存器。
the three data registers ..in which you want to move the value then you go to data records the first data record we named it as green which will highlight what value you want to move in these three registers ...these registers lid, Base 1 and Base 2 ...these three columns these are created automatically because we have created that here so these rows here are now here as column okay so when I press on green when I actuate the green it will move to 3-3 in this respective data registers.
如果我启用配方蓝色,它将移动 5-6-6 如果我启用蓝色和绿色,它将移动 2-6 和 5-6-6。 3 现在这个数字非常重要,为什么它是重点,因为当我们要在 HMI 上创建按钮时,如下所示,这是一个绿色按钮,如果您转到它的页面,这个绿色按钮会被赋予一个功能。财产 ..
If I enable recipe blue it will move 5-6-6 if I enable blue and green it will move 2-6 & 3 Now this number is very important all right why it is the point because when we are going to create buttons on the HMI like shown here this is a green button and this green button has been given a function in the evens if you go to its property ..
转到此处的事件,它说将数据记录设置到 PLC。
go to the events here it says set data record to PLC.
好吧,现在让我删除这个函数,这些函数只是用来驱动 LED 的。
Alright now let me just delete this function and these functions are just used to actuate the LED.
好吧..
Alright..
稍后我会回到这个蓝色......
I'll come back to that later this blue...
让我也删除它...
let me delete that as well...
我们需要蓝色..
we need blue..
现在就留下它如何使用这个普通按钮启动配方这个按钮我们从工具箱中取出这是一个标准按钮,将此按钮重命名为绿色,当你点击绿色时转到它的事件,在这里你如果您单击此处,可以添加功能并在功能中...
leave it as well all right now how to actuate the recipe using this normal button this button we have took from toolbox this is a standard button and this rename this button to green and when you go to click on green go to its event and here you can add function and in the function if you click here...
你可以看看菜谱...
you can see the recipe...
好的...
okay...
在菜谱中,只要打开它,您就会发现一个选项,将数据记录设置为PLC,好吗?
in the recipe just open that and you will find an option set data record to PLC okay?
单击此选项,您将有更多选项,它显示菜谱编号,现在菜谱编号要返回此处,菜谱编号是 1 合 1 菜谱编号。
Click on this one and you will have further options it says recipe number now recipe number is to go back here recipe number is 1 In 1 recipe number..
我们使用绿色,因此绿色是数据记录号 1。
we are using green so green is a data record number 1.
好的,您不必检查必须检查配方 1 中的数据记录的元素 - 数据记录 1 是绿色的。
Okay you don't have to check the elements you have to check the data record in the recipe 1 - data record 1 is green.
所以这里这是记录1,数据记录1默认为1,所以这是可以的。
So here this is record one and data record 1 is by default 1, so this is ok.
让我们回到蓝色...
Let's go back to blue...
在蓝色中,您将看到类似的情况,我们将向 PLC 添加设置的数据记录...
in blue you will see similarly we will add set data record to PLC...
现在这里配方编号为 1,但数据记录编号为 2。
now here recipe number is 1 but data record number is 2.
为了确认您可以在此处看到,蓝色为 2,绿色为 3,因此配方 1 数据记录 3..
To confirm that you can see here the blue is 2 for blue and green it's 3, so recipe 1 data record 3..
返回到屏幕绿色和蓝色..事件...
go back to the screen green and blue..events...
将功能集数据记录添加到 PLC...
add function set data record to PLC...
食谱是1..
recipe is 1..
数据记录3 好吧,就这样了……
data record 3 Alright so that's it...
这就是您创建配方的方式,以便您可以保存项目,然后可以进行模拟并进行检查。
that's how you create the recipes so you can save your project and you can go to simulation and you can check that.
现在来看这个 LED,如果按下绿色按钮,我们想要什么,我们想要这个被卡住的矩形,你知道我从这里拿来的。
Now coming to this LEDs what do we want if green button is pressed we want this rectangle which is stuck which is you know which I took from here..
这个矩形和这个已经被动画化了,所以这个矩形已经被它的外观动画化了,如果它是0,它是白色的,如果它是1,它是绿色的。
this rectangle and this has been animated so this rectangle has been animated by its appearance that if it is 0 it's white if it is 1 it's green..
好吧..现在让我们来谈谈这个数据矩形的标签我没有使用PLC标签,因为我认为在这里使用PLC标签没有多大关系,所以我采用了HMI内部标签,所以你可以转到HMI - 我的标签单击“显示所有标签”,因此我创建了一些名为 - 绿色 HMI - 蓝色 HMI GB1、GB2 的标签 好吗?
all right ..now let's talk about the tag for this data rectangle I am not using a PLC tag because that is I didn't think it was much relevant to use PLC tag here so I took the HMI internal tag so you go to the HMI - my tags click on show all tags so I created some tags named - Green HMI - Blue HMI GB1, GB2 Okay?
我创建了四个标签,所以如果您注意到这里这四个标签是内部标签,它们没有连接到 PLC,因为我不必对此进行任何 PLC 计算,所以我将返回到根屏幕,因此该绿色已被标记。 ...
I created four tags so if you notice here these four tags are internal tags these are not connected to PLC because I don't have to do any PLC calculations on that so I'll go back to root screen so this green has been tagged....
绿色人机界面...
green HMI...
这已被标记为蓝色 HMI 这是 GB1 这是 GB2 ..GB 表示绿色蓝色 ...现在就启动此 1 当绿色是第一个时我所做的是我将转到屏幕上的此事件会注意到我使用了设置位绿色HMI。
this has been tagged with blue HMI this is GB1 this is GB2 ..GB means green blue ...all right now to actuate this 1 when green is first what I've done is I'll go to this event of the screen you will notice I have used set bit green HMI.
绿色 HMI 是这个矩形的标签,类似地,我正在重置其他三个标签,这意味着如果我按这个绿色,这三个标签将关闭,所以我重置了蓝色 HMI...
Green HMI is this tag of this rectangle and similarly I'm resetting other three tags which means if I press this green these three will be off so I have reset blue HMI...
我已经类似地重置了GB1和GB2...
I have reset GB1 and GB2 similarly...
如果是蓝色,我设置了蓝色 HMI,这是我的蓝色 HMI...
in case of blue I have set blue HMI and this is my blue HMI...
重置绿色HMI..
reset green HMI..
重置 GB1 并重置 GB2。
reset GB1 and reset GB2.
好吧?
Alright?
同样,这里我设置了这两个并重置了这两个..
Similarly here I have SET these two and RESET these two..
就是这样...
that's it...
所以让我们再次上网,我应该释放力量,以便我们的 HMI 加载到这里,让我们进入 PLC 编程,向您展示我们如何移动值,所以这是 MB110 ....MB111 ..MB112 好吧,所以如果您请注意,如果我单击绿色,则为 5-6-3,则为 2-3-3,这与我们在配方表中看到的蓝色为 5-6-6 类似。
so let's go to online again and I should release the forces so our HMI is loaded here and let's go to PLC programming to show you how we are moving the value so this is MB110 ....MB111 ..MB112 all right so if you notice that it's 5-6-3 if i click on green it's 2-3-3 it's similar to what we have seen in the recipe table for blue it's 5-6-6.
对于绿色和蓝色,它是 2-6-3..
For Green and blue it's 2-6-3..
好吧,如果您注意到这 3 个值出现,因为我们使用了这些标签,盖子颜色输入是在我们的 PLC 中定义的,那么基色输入是 111...
alright once again if you notice these 3 values come because we have used these tags lid color input which was defined in our PLC alright base color input was 111...
输入 2 是 112,110 是盖子颜色输入,所以...这取决于您想要多少个食谱,想要移动多少个值...
input 2 was 112 and 110 was lid color input so it's ...it's up to you how many recipes you want how many values you want to move...
这个配方中有很多配方表的区域,您可以在 PLC 中移动它们,我希望这个练习有意义,并且您可以在自己的装配逻辑中有效地使用这个配方...
you have area for so many recipe tables here in this recipe which you can move in your PLC and I hope this this exercise makes sense and you can effectively use this recipe in your own logic for assembly...
对于混合操作,其中您有不同的计时值...不同的温度设定点值,并且可能有许多应用可以使用配方...所以这是有效的方法之一,当然可能还有许多其他方法将值移动到数据电阻器的方法,但如果您使用配方,它会变得很容易,因为您的数据在 HMI 中组织得很好。
for mixing operation in which you have different values for timings ...different values for temperature set points and there could be many applications where you can use the recipes ...so this is one of the effective way of course there could be many other ways to move the value to the data resistor but if you're doing using recipe it will make it easy because your data is pretty much organized in the HMI.
好吧,在这个程序中,如果您在计算机上观看它,如果您正在下载它,我希望您会喜欢它,但如果有任何错误,总是有改进的范围,请向我报告,您可以下载这个PLC程序有HMI屏幕,我也会上传这个工厂IO场景..这样你就不必自己制作了..
Alright and in this program if you're watching it in your computer if you're downloading it I hope you will like it but there is always the scope of improvement if there is any bug in that please report that to me and you can download this PLC program there's HMI screen and I will also upload this Factory IO scene..so that you don't have to make it by yourself..
您可以在 Factory IO 中快速上传该场景。
you can just quickly upload that scene in your Factory IO.
好的,感谢您的观看,下一个视频见
Alright thank you for watching and I'll see you in the next video